﻿namespace Zen.BlackBerry.Web.Models
{
	using Zen.BlackBerry.Subscription;
	using System.Collections.Generic;

	public class PartialSubscriberModel
	{
		/// <summary>
		/// Gets or sets the address.
		/// </summary>
		/// <value>The address.</value>
		public string Address
		{
			get;
			set;
		}

		/// <summary>
		/// Gets or sets the subscriber id.
		/// </summary>
		/// <value>The subscriber id.</value>
		public string SubscriberId
		{
			get;
			set;
		}

		/// <summary>
		/// Gets or sets the push application id.
		/// </summary>
		/// <value>The push application id.</value>
		public string PushApplicationId
		{
			get;
			set;
		}

		/// <summary>
		/// Gets or sets the status.
		/// </summary>
		/// <value>The status.</value>
		public SubscriberStatus Status
		{
			get;
			set;
		}

		/// <summary>
		/// Gets or sets the type.
		/// </summary>
		/// <value>The type.</value>
		public SubscriberType Type
		{
			get;
			set;
		}
	}

	public class FullSubscriberModel : PartialSubscriberModel
	{
	}

	public class SubscriberStatisticsModel
	{
		private List<OsVersionCountModel> _osVersions;
		private List<DeviceModelCountModel> _deviceModels;

		public List<OsVersionCountModel> OsVersions
		{
			get
			{
				if (_osVersions == null)
				{
					_osVersions = new List<OsVersionCountModel>();
				}
				return _osVersions;
			}
		}

		public List<DeviceModelCountModel> DeviceModels
		{
			get
			{
				if (_deviceModels == null)
				{
					_deviceModels = new List<DeviceModelCountModel>();
				}
				return _deviceModels;
			}
		}

		public int TotalSubscriberCount
		{
			get;
			set;
		}

		public int ActiveSubscriberCount
		{
			get;
			set;
		}

		public int SuspendedSubscriberCount
		{
			get;
			set;
		}
	}

	public class CountBaseModel
	{
		public int Count
		{
			get;
			set;
		}
	}

	public class OsVersionCountModel : CountBaseModel
	{
		public string OsVersion
		{
			get;
			set;
		}
	}

	public class DeviceModelCountModel : CountBaseModel
	{
		public string Model
		{
			get;
			set;
		}
	}
}